package casa.depesos.app.com.view.tab;

import android.content.Context;
import android.graphics.Color;
import android.view.LayoutInflater;
import android.widget.FrameLayout;

import androidx.annotation.NonNull;

import casa.depesos.app.com.R;
import casa.depesos.app.com.databinding.CustomTabLayoutBinding;


public class CustomTabView extends FrameLayout {

    public CustomTabLayoutBinding binding;

    public CustomTabView(@NonNull Context context) {
        super(context);
        binding = CustomTabLayoutBinding.inflate(LayoutInflater.from(context), this, true);
        binding.tv.setTextColor(0xff17132A);
        binding.tv.setBackgroundResource(R.drawable.top5);
    }

    @Override
    public void setSelected(boolean selected) {
        super.setSelected(selected);
        binding.tv.setTextColor(selected ? Color.WHITE : 0xff17132A);
        binding.tv.setBackgroundResource(selected ? R.drawable.top4 : R.drawable.top5);
    }
}
